<?php

if (!Route::cache()) {
    Route::set('leadtime', '<controller>(/<action>(/<id>))', array(
        'controller' => 'leadtime|monthsales|ebaysales|skusales|skusalesshow|salessearchshow'
    ))->defaults(array(
        'controller' => 'leadtime',
        'action' => 'index',
    ));
    Route::set('checkstock', 'checkstock(/<action>(/<id>))')
            ->defaults(array(
                'controller' => 'checkstock',
                'action' => 'index',
    ));
    Route::set('leadreport', 'leadreport(/<action>(/<id>))')
            ->defaults(array(
                'controller' => 'leadreport',
                'action' => 'index',
    ));
    Route::set('smtsales', 'smtsales(/<action>(/<id>))')
            ->defaults(array(
                'controller' => 'smtsales',
                'action' => 'index',
    ));
    Route::set('wishsales', 'wishsales(/<action>(/<id>))')
            ->defaults(array(
                'controller' => 'wishsales',
                'action' => 'wishcron',
    ));
    Route::set('amazonsales', 'amazonsales(/<action>(/<id>))')
            ->defaults(array(
                'controller' => 'amazonsales',
                'action' => 'index',
    ));

    Route::set('warn', 'warn(/<action>(/<id>))')
            ->defaults(array(
                'controller' => 'warn',
                'action' => 'index',
    ));

    Route::set('sirens', 'sirens(/<action>(/<id>))')
            ->defaults(array(
                'controller' => 'sirens',
                'action' => 'index',
    ));

    Route::set('longlead', 'longlead(/<action>(/<id>))')
            ->defaults(array(
                'controller' => 'longlead',
                'action' => 'index',
    ));

    Route::set('stocksale', 'stocksale(/<action>(/<id>))')
            ->defaults(array(
                'controller' => 'stocksale',
                'action' => 'index',
    ));

    Route::set('storsearch', 'storsearch(/<action>(/<id>))')
            ->defaults(array(
                'controller' => 'storsearch',
                'action' => 'index',
    ));

    Route::set('lowstock', 'lowstock(/<action>(/<id>))')
            ->defaults(array(
                'controller' => 'lowstock',
                'action' => 'index',
    ));
}

//权限设置

ACL::set('leadtime', array(
    'leadreport' => array(
        'title' => __('供应商SKU交期报表'),
        'restrict access' => TRUE,
        'description' => '',
    ),
    'skusalesshow' => array(
        'title' => __('SKU销量趋势报表'),
        'restrict access' => TRUE,
        'description' => '',
    ),
    'salessearchshow' => array(
        'title' => __('SKU平台销量查询'),
        'restrict access' => TRUE,
        'description' => '',
    ),
    'checkstock' => array(
        'title' => __('库存盘点预警'),
        'restrict access' => TRUE,
        'description' => '',
    ),
    'stocksale' => array(
        'title' => __('实时库存加权销量下载'),
        'restrict access' => TRUE,
        'description' => '',
    ),
    'storsearch' => array(
        'title' => __('库存储位实时查询'),
        'restrict access' => TRUE,
        'description' => '',
    ),
));
